package com.admyvi.templates.gradle.springboot.service.impl;

import com.admyvi.templates.gradle.springboot.mapper.BiomsCnfAgencyMapper;
import com.admyvi.templates.gradle.springboot.modal.BiomsCnfAgencyModal;
import com.admyvi.templates.gradle.springboot.service.BiomsCnfAgencyService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author XiangKang on 2017/8/23.
 */
@Service
public class BiomsCnfAgencyServiceImpl implements BiomsCnfAgencyService {
    private final Logger logger = LoggerFactory.getLogger(getClass());

    @Autowired
    private BiomsCnfAgencyMapper mapper;

    @Cacheable(value = "BiomsCnfAgencyServiceImpl:queryAll", key = "\"noArgs\"")
    @Override
    public List<BiomsCnfAgencyModal> queryAll() {
        logger.debug("query BiomsCnfAgencyModalList from BiomsCnfAgencyMapper");
        return mapper.queryAll();
    }

    @Cacheable(value = "BiomsCnfAgencyServiceImpl:getStr", key = "\"noArgs\"")
    @Override
    public String getStr() {
        logger.debug("execute getStr of BiomsCnfAgencyServiceImpl");
        return "this is getStr";
    }
}
